package com.hh.bss.base;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.transaction.annotation.Transactional;


public interface BusinessService <E,PK extends Serializable>{
	
	
	public E getById(PK id) throws DataAccessException;	
	
	public List<E> findAll() throws DataAccessException;
	public List findByHql(String hql) throws DataAccessException;

	public void saveOrUpdate(E entity) throws DataAccessException;
	
	/** 插入数据 */
	public void save(E entity) throws DataAccessException;
	
	public void removeById(PK id) throws DataAccessException;
	
	public void update(E entity) throws DataAccessException;	
	
	public boolean isUnique(E entity, String uniquePropertyNames) throws DataAccessException ;
	public EntityDao getEntityDao();
}
